﻿using System;
using System.Net;
using System.Runtime.Serialization;

namespace Airport
{
    [DataContract]
    public class VehicleType
    {

        private int _vehicleTypeId;
        private string _typeName;
        private int _length;
        private int _width;

        public VehicleType()
            : this(-1, "", -1, -1)
        {
        }

        public VehicleType(int vehicleTypeId, string typeName, int length, int width)
        {
            _vehicleTypeId = vehicleTypeId;
            _typeName = typeName;
            _length = length;
            _width = width;
        }

        [DataMember]
        public int VehicleTypeId
        {
            get
            {
                return _vehicleTypeId;
            }

            set
            {
                if (_vehicleTypeId != value)
                {
                    _vehicleTypeId = value;
                }
            }
        }

        [DataMember]
        public string TypeName
        {
            get
            {
                return _typeName;
            }

            set
            {
                if (_typeName != value)
                {
                    _typeName = value;
                }
            }
        }

        [DataMember]
        public int Length
        {
            get
            {
                return _length;
            }

            set
            {
                if (_length != value)
                {
                    _length = value;
                }
            }
        }

        [DataMember]
        public int Width
        {
            get
            {
                return _width;
            }

            set
            {
                if (_width != value)
                {
                    _width = value;
                }
            }
        }
    }
}
